<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" 
           %><%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"
           %><%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"
           %><%@ page contentType="text/html;charset=ISO-8859-1"
           %><html:html>
    <head>
        <title>Producto</title>
        <html:base/>
        <%@include file="../header/include.jsp" %>
    </head>
    <body>
        <div id="header"  class="ui-widget-header ui-corner-all">
            <h1><bean:message key="all.title"/></h1>
            <div id="menu">
                <%--    <ul id="nav">
                        <li><html:link action="/APreModificarProducto.do" paramId="idCatalogo" paramName="idCatalogo"><bean:message key="VProducto.label0"/></html:link></li>
                        <li><html:link action="/APreCatalogo.do" paramId="clasificacion" paramName="clasificacion"><bean:message key="VProducto.label1"/></html:link></li>
                        <li><html:link action="/AEliminarProducto.do" paramId="idCatalogo" paramName="idCatalogo"><bean:message key="VProducto.label2"/></html:link></li>

                </ul>
                --%></div>
        </div>
        <div id="body_wrapper">
            <div id="body">
                <div id="split">
                    <div class="top"></div>
                    <div id="left">
                        <div id="content">

                            <div class="ui-widget-header ui-corner-top "><h1>Producto </h1></div>


                                <script>

                                function eliminarProducto(id) {
                                    $( "#dialog-confirm" ).dialog({
                                        resizable: false,

                                        height:140,
                                        modal: true,
                                        buttons: {
                                            "Borrar": function() {
                                                var url = "<html:rewrite action="AEliminarProducto.do" />?idCatalogo="+id;
                                                $(location).attr('href',url);
                                            },
                                            Cancelar: function() {
                                                $( this ).dialog( "close" );
                                            }
                                        }
                                    });
                                }
                            </script>


                            <div id="dialog-confirm" title="Eliminar" style="display: none;">
                                <p><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"></span>Se eliminar&aacute; este elemento. Est&aacute; seguro?</p>
                            </div>
                            <div  class="ui-widget-content ui-widget">
                                <div style="float: right;margin: 1% 1% 1% 1%; clear: left;">
                                    <ul class="sf_admin_td_actions fg-buttonset fg-buttonset-single">
                                        <cohesion:actor actors="5"><li class="sf_admin_action_usuario"><html:link action="/APreEditarProducto.do" paramId="idCatalogo" paramName="idCatalogo" styleClass="fg-button-mini fg-button ui-state-default fg-button-icon-left"><span class="ui-icon ui-icon-pencil"></span>Editar Producto</html:link></li></cohesion:actor>
                                        <cohesion:actor actors="1"><li class="sf_admin_action_usuario"><a  href="" onclick="eliminarProducto(<bean:write name="idCatalogo"/>);return false;" class="fg-button-mini fg-button ui-state-default fg-button-icon-left"><span class="ui-icon ui-icon-trash"></span>Eliminar</a></li></cohesion:actor>
                                        <cohesion:actor actors="5"><li class="sf_admin_action_usuario"><html:link action="/APreCatalogo.do" paramId="clasificacion" paramName="clasificacion" styleClass="fg-button-mini fg-button ui-state-default fg-button-icon-left"><span class="ui-icon ui-icon-arrowreturnthick-1-w"></span>Ir al Cat&aacute;logo</html:link></li></cohesion:actor>
                                    </ul>
                                </div>
                                <div class="show ui-grid-table ui-widget ui-corner-all ui-helper-reset ui-helper-clearfix">
                                    <table>
                                        <tr>
                                            <th class="atributos ui-state-default ui-th-column" colspan="2" style="text-align: center;">Descripci&oacute;n del Producto</th>
                                        </tr>
                                        <tr>
                                            <th class="atributos ui-state-default ui-th-column">Nombre</th>
                                            <th class="valor sf_admin_row ui-widget-content">${Catalogo.nombre}</th>
                                        </tr>
                                        <tr>
                                            <th class="atributos ui-state-default ui-th-column">Cantidad en Almac&eacute;n</th>
                                            <th class="valor sf_admin_row ui-widget-content">${Catalogo.cantidad}</th>
                                        </tr>
                                        <tr>
                                            <th class="atributos ui-state-default ui-th-column">C&oacute;digo de Barra</th>
                                            <th class="valor sf_admin_row ui-widget-content">${Catalogo.codigo}</th>
                                        </tr>
                                        <tr>
                                            <th class="atributos ui-state-default ui-th-column">Costo</th>
                                            <th class="valor sf_admin_row ui-widget-content">${Catalogo.costo}</th>
                                        </tr>
                                        <tr>
                                            <th class="atributos ui-state-default ui-th-column">Impuesto</th>
                                            <th class="valor sf_admin_row ui-widget-content">${Catalogo.impuesto}</th>
                                        </tr>
                                        <tr>
                                            <th class="atributos ui-state-default ui-th-column">Marca</th>
                                            <th class="valor sf_admin_row ui-widget-content">${Catalogo.marca}</th>
                                        </tr>
                                        <tr>
                                            <th class="atributos ui-state-default ui-th-column">Clasificaci&oacute;n</th>
                                            <th class="valor sf_admin_row ui-widget-content">${Catalogo.clasificacion.nombre}</th>
                                        </tr>
                                        <tr>
                                            <th class="atributos ui-state-default ui-th-column">Estado</th>
                                            <logic:equal  name="Catalogo" property="activo" value="true">
                                                <th class="valor sf_admin_row ui-widget-content">activo</th>
                                            </logic:equal>
                                            <logic:equal  name="Catalogo" property="activo" value="false">
                                                <th class="valor sf_admin_row ui-widget-content">no activo</th>
                                            </logic:equal>

                                        </tr>
                                        <tr>
                                            <th class="atributos ui-state-default ui-th-column">Descripci&oacute;n</th>
                                            <td class="valor sf_admin_row ui-widget-content">${Catalogo.descripcion}</td>
                                        </tr>


                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div id="right">

                        <%@include file="../administrador/VMenuAdmin.jsp" %>
                    </div>
                    <div class="clearer ui-helper-clearfix"></div>
                    <div class="bottom"></div>
                </div>
                <div class="clearer"></div>
            </div>
            <div class="clearer"></div>
        </div>
        <div id="end_body"></div>
        <div id="footer"> <%@include file="/footer/include.jsp" %> </div>
    </body>
</html:html>